package com.wxdc.nmgyt.nmgytwydc.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.ToMany;

import java.util.List;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.DaoException;
import com.wxdc.nmgyt.nmgytwydc.greendao.DaoSession;
import com.wxdc.nmgyt.nmgytwydc.greendao.GmYfWzInfoBeanDao;
import com.wxdc.nmgyt.nmgytwydc.greendao.GmYfInfoBeanDao;

/**
 * Created by Administrator on 2018/7/13.
 * 灌木样方
 */
@Entity
public class GmYfInfoBean {

    @Id(autoincrement = true)
    private Long id; //@Id表示该字段是id，注意该字段的数据类型为包装类型Long
    /**
     * SAMPLEPLOTID : 150124-111-2018
     * SAMPLEPLOTNAME : yueye1
     * SHRUBID : 15012 4-111-2018-GM-01
     * YFMJ : 50.0
     * ZGD : 30.0
     * SHBZ : 1
     * VERSION : 2018/9/27 21:22:27
     * PICNAME :
     * SHRUB_WZ :
     */
    private String SAMPLEPLOTID;
    private String SAMPLEPLOTNAME;
    private String SHRUBID;
    private String YFMJ;
    private String ZGD;
    private String SHBZ;
    private String VERSION;
    private String PICNAME;
    @ToMany(referencedJoinProperty = "gmyfInfoId")
    private List<GmYfWzInfoBean> SHRUB_WZ;
    private String YFH;//样方号
    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;
    /** Used for active entity operations. */
    @Generated(hash = 561728410)
    private transient GmYfInfoBeanDao myDao;
    @Generated(hash = 307060715)
    public GmYfInfoBean(Long id, String SAMPLEPLOTID, String SAMPLEPLOTNAME,
            String SHRUBID, String YFMJ, String ZGD, String SHBZ, String VERSION,
            String PICNAME, String YFH) {
        this.id = id;
        this.SAMPLEPLOTID = SAMPLEPLOTID;
        this.SAMPLEPLOTNAME = SAMPLEPLOTNAME;
        this.SHRUBID = SHRUBID;
        this.YFMJ = YFMJ;
        this.ZGD = ZGD;
        this.SHBZ = SHBZ;
        this.VERSION = VERSION;
        this.PICNAME = PICNAME;
        this.YFH = YFH;
    }
    @Generated(hash = 1968287986)
    public GmYfInfoBean() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getSAMPLEPLOTID() {
        return this.SAMPLEPLOTID;
    }
    public void setSAMPLEPLOTID(String SAMPLEPLOTID) {
        this.SAMPLEPLOTID = SAMPLEPLOTID;
    }
    public String getSAMPLEPLOTNAME() {
        return this.SAMPLEPLOTNAME;
    }
    public void setSAMPLEPLOTNAME(String SAMPLEPLOTNAME) {
        this.SAMPLEPLOTNAME = SAMPLEPLOTNAME;
    }
    public String getSHRUBID() {
        return this.SHRUBID;
    }
    public void setSHRUBID(String SHRUBID) {
        this.SHRUBID = SHRUBID;
    }
    public String getYFMJ() {
        return this.YFMJ;
    }
    public void setYFMJ(String YFMJ) {
        this.YFMJ = YFMJ;
    }
    public String getZGD() {
        return this.ZGD;
    }
    public void setZGD(String ZGD) {
        this.ZGD = ZGD;
    }
    public String getSHBZ() {
        return this.SHBZ;
    }
    public void setSHBZ(String SHBZ) {
        this.SHBZ = SHBZ;
    }
    public String getVERSION() {
        return this.VERSION;
    }
    public void setVERSION(String VERSION) {
        this.VERSION = VERSION;
    }
    public String getPICNAME() {
        return this.PICNAME;
    }
    public void setPICNAME(String PICNAME) {
        this.PICNAME = PICNAME;
    }
    public String getYFH() {
        return this.YFH;
    }
    public void setYFH(String YFH) {
        this.YFH = YFH;
    }
    /**
     * To-many relationship, resolved on first access (and after reset).
     * Changes to to-many relations are not persisted, make changes to the target entity.
     */
    @Generated(hash = 96596583)
    public List<GmYfWzInfoBean> getSHRUB_WZ() {
        if (SHRUB_WZ == null) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            GmYfWzInfoBeanDao targetDao = daoSession.getGmYfWzInfoBeanDao();
            List<GmYfWzInfoBean> SHRUB_WZNew = targetDao
                    ._queryGmYfInfoBean_SHRUB_WZ(id);
            synchronized (this) {
                if (SHRUB_WZ == null) {
                    SHRUB_WZ = SHRUB_WZNew;
                }
            }
        }
        return SHRUB_WZ;
    }
    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    @Generated(hash = 246899747)
    public synchronized void resetSHRUB_WZ() {
        SHRUB_WZ = null;
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 1648602987)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getGmYfInfoBeanDao() : null;
    }

    @Override
    public String toString() {
        return "GmYfInfoBean{" +
                "id=" + id +
                ", SAMPLEPLOTID='" + SAMPLEPLOTID + '\'' +
                ", SAMPLEPLOTNAME='" + SAMPLEPLOTNAME + '\'' +
                ", SHRUBID='" + SHRUBID + '\'' +
                ", YFMJ='" + YFMJ + '\'' +
                ", ZGD='" + ZGD + '\'' +
                ", SHBZ='" + SHBZ + '\'' +
                ", VERSION='" + VERSION + '\'' +
                ", PICNAME='" + PICNAME + '\'' +
                ", SHRUB_WZ=" + SHRUB_WZ +
                ", YFH='" + YFH + '\'' +
                '}';
    }
}
